{% extends '::base.html.twig' %}

{% block title %}{{ parent() }}{% endblock %}

{% block stylesheets %}{{ parent() }}<link href="{{ asset('bundles/gessehcore/css/main.css') }}" type="text/css" rel="stylesheet" />{% endblock %}

{% block logo %}{{ parent() }}{% endblock %}

{% block sitename %}{{ parent() }}{% endblock %}

{% block nav %}
  {% if 'admin' in app.request.uri %}
    {{ knp_menu_render('admin', {'currentAsLink': false}) }}
  {% elseif is_granted('ROLE_STUDENT') %}
    {{ knp_menu_render('student') }}
  {% else %}
    {{ knp_menu_render('anon') }}
  {% endif %}
{% endblock %}

{% block body %}
  <h1>{% block titlecontent %}{% endblock %}</h1>

  {% for type, flashMessages in app.session.flashbag.all() %}
    {% for flashMessage in flashMessages %}
      <div class="flash{{ type }}">{{ flashMessage }}</div>
    {% endfor %}
  {% endfor %}


  <ul>{% block actionscontent %}{% endblock %}</ul>

  <div>{% block content %}{% endblock %}</div>
{% endblock %}

{% block javascripts %}
  <script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
{% endblock %}
